#ifndef SETTINGSSINGLETON_H
#define SETTINGSSINGLETON_H
#include <QSettings>
#include <QFontDialog>
#include <QColorDialog>
#include <QDir>
#include <QDirIterator>
#include <QStringList>
#include <QLocale>
#include <iostream>

class Settings
{
public:
    Settings();
    ~Settings();
    bool firstLaunchTime();
    void generateDefaultOptions();
    QStringList getAvailableLangages();
    //00 : other
    bool hasCrashed();
    void setCrashed(bool crashed);
    //01 : interface
    void setContinuePlaying(bool continuePlaying);
    bool isContinuePlaying();
    void setLangage(QString langage);
    QString getLangage();
    void setIdLangage(int idLangage);
    int getIdLangage();

    void setIdExtractionMethod(int id);
    int getIdExtractionMethod();
    // 01.1 method 01
    void setAutomaticMaxNSecBefore(int nSecBefore);
    int getAutomaticMaxNSecBefore();
    void setAutomaticMaxNSecAfter(int nSecAfter);
    int getAutomaticMaxNSecAfter();
    void setAutomaticSensibility(int sensibility);
    int getAutomaticSensibility();
    void setAutomaticMedianDataSize(int medianDataSize);
    int getAutomaticMedianDataSize();
    // 01.1 method 02
    void setNormalNSecBefore(int nSecBefore);
    int getNormalNSecBefore();
    void setNormalNSecAfter(int nSecAfter);
    int getNormalNSecAfter();
    //02 : subtitle
    void setSubtitlePropertie01(QFont font, QColor color, int y);
    QFont getFontSubtitlePropertie01();
    QColor getColorSubtitlePropertie01();
    int getYSubtitlePropertie01();
    void setSubtitlePropertie02(QFont font, QColor color, int y);
    QFont getFontSubtitlePropertie02();
    QColor getColorSubtitlePropertie02();
    int getYSubtitlePropertie02();
    void setSubtitlePropertie03(QFont font, QColor color, int y);
    QFont getFontSubtitlePropertie03();
    QColor getColorSubtitlePropertie03();
    int getYSubtitlePropertie03();
    void setSubtitlePropertie04(QFont font, QColor color, int y);
    QFont getFontSubtitlePropertie04();
    QColor getColorSubtitlePropertie04();
    int getYSubtitlePropertie04();
    //03 : video
    //04 : audio
    void setVolume(int percentage);
    int getVolume();


private:
    QSettings *settings;
};

#endif // SETTINGSSINGLETON_H
